<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title>实习首页</title>
		<link rel="stylesheet" type="text/css" href="./css/weui.min.css">
		<link rel="stylesheet" type="text/css" href="./css/api.css"/>
		<link rel="stylesheet" type="text/css" href="./css/mui.min.css">
		<link rel="stylesheet" href="./css/base.css">
		<link rel="stylesheet" type="text/css" href="css/news.css">
		<style>
			body {
			}
			.rotation-img {
				width: 100%;
				height: 56vw;
				background-image: url(image/course_placehoder.png);
				background-size: 100% 100%;
				display: block;
			}

			.base_back_icon {
                 height: 30px;
                 position: absolute;
                 top: 7px;
                 left: 7px;
                 margin-top: 0;
             }
			.imgSet {
				width: 42px;
				height: 42px;

			}
			.spanstyle {
				text-align: center;
			}
			.div_buton {
				width: 20%;
				height: 80px;
				text-align: center;
				margin-top: 10px;
				float: left;
			}
			.div_buton25 {
				width: 25%;
				height: 80px;
				text-align: center;
				margin-top: 10px;
				float: left;
			}
			.div_buton33 {
				width: 33%;
				height: 80px;
				text-align: center;
				margin-top: 10px;
				float: left;
			}
			.img_width {
				width: 14px;
				position: relative;
				top: 2px;
			}
			.padding_left5 {
				padding-left: 5px;
			}
			.divstyle {
				padding-left: 10px;
				padding-right: 10px;
				line-height: 40px;
			}
			.train-title {
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
				padding-right: 10px;
			}
			.left10 {
				padding-left: 10px;
			}
			.right10 {
				/*	padding-right: 10px;*/
			}
			#div_course {
				padding-top: 10px;
				background: #FFFFFF;
			}
			p {
				margin-top: -10px;
				margin-bottom: 5px;
			}
			.img_background-image {
				display: block;
				background-image: url(../../image/course_placehoder.png);
				background-size: 30vw 100%;
				border: 1px solid #fff;
				border-radius: 4px;
			}
			#div_course {
				padding-right: 10px;
				padding-left: 10px;
			}
		</style>
	</head>
	<body>
		<div id="main" style="background-color: #f3f5f7;"  hidden="hidden">
			<a id="btnBack" class="base_left_item" href="#" onclick="backClick()"> <img class="base_back_icon" src="./image/icon_bgback.png" alt=""> </a>
			<!-- 轮播图 -->
			<div id="train_slider" class="mui-slider rotation-div" >
				<div id="rotation" class="mui-slider-group mui-slider-loop"></div>
				<div id="noRotation"  hidden="hidden">
					<div class="rotation-cell">
						<a href="#" style="display: block;"> <img class="rotation-img" src="./image/firstNewsTitls2.png"> </a>
					</div>
				</div>
				<div id="pageControl" class="mui-slider-indicator"></div>
			</div>
			<div  style="width: 100%; background-color: #FFFFFF;" class="clearfix"  >
				<div id="Tec_div"  hidden="hidden">
					<div class="div_buton25" id="qiandao">
						<img src="./image/icon01.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							签到
						</div>
					</div>
				
					<div class="div_buton25" id="chakan_baogao">
						<img src="./image/icon05.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							报告
						</div>
					</div>
			
					<div class="div_buton25" id="managementid">
						<img src="./image/icon_management.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							管理
						</div>
					</div>
					<div class="div_buton25" id="xunfangjilu">
						<img src="./image/icon_xunfang-.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							巡视
						</div>
					</div>
				</div>
				<div id="stu_div"  hidden="hidden" >
					<div class="div_buton" id="Stuqiandao">
						<img src="./image/icon_qiandao.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							签到
						</div>
					</div>
				
					<div class="div_buton" id="tijiaoBaogao">
						<img src="./image/icon05.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							报告
						</div>
					</div>
					<div class="div_buton" id="learnid">
						<img src="./image/icon_xuexi.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							学习
						</div>
					</div>
					<div class="div_buton" id="testid">
						<img src="./image/icon_test.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							考核
						</div>
					</div>
					<div class="div_buton" id="guijiid">
						<img src="./image/icon_guiji.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							轨迹
						</div>
					</div>
				</div>
				<div id="Master_div"  hidden="hidden">
					<div class="div_buton33" id="discipleid">
						<img src="./image/icon_disciple.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							徒弟
						</div>
					</div>
					<div class="div_buton33" id="Masbaogao">
						<img src="./image/icon05.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							报告
						</div>
					</div>
					<div class="div_buton33" id="pingfenid">
						<img src="./image/icon_indx_pingfen.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							评分
						</div>
					</div>
				</div>
			
	
				<div id="HR_div"  hidden="hidden">
					<div class="div_buton25" id="HRqiandao">
						<img src="./image/icon01.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							签到
						</div>
					</div>
				
					<div class="div_buton25" id="HRchakan_baogao">
						<img src="./image/icon05.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							报告
						</div>
					</div>
			
					<div class="div_buton25" id="HRmanagementid">
						<img src="./image/icon_management.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							管理
						</div>
					</div>
					<div class="div_buton25" id="HRAnalysis">
						<img src="./image/icon_analyze.png" class="imgSet" />
						<div class="font13 base_black_grey ">
							分析
						</div>
					</div>
			</div>
			</div>
			<div class="divstyle bgcolor">
				<img src="image/icon_guess_like.png"  class="img_width"/><samp class="base_dark_grey base_content_font padding_left5">猜你喜欢</samp>
			</div>
			<!--<ul class="mui-table-view" id="div_course" ></ul>-->
			<div class="clearfix" id="div_course">
				<!--<div  class= "div_img_left clearfix right10" onclick="CheckCourseClick(' + i + ')">
				<img  src="http://ossimg.cfnet.org.cn/img/20171106/0-1509946712-63126.png" class="td_left img_background-image" onerror="Imgnofind()"/>
				<p   class="base_content_font base_black_grey padding_left_right5">
				无锡我羡慕羡慕羡慕
				</p>
				</div>
				<div  class= "div_img_left right10" onclick="CheckCourseClick(' + i + ')">
				<img  src="http://ossimg.cfnet.org.cn/img/20171106/0-1509946712-63126.png" class="td_left img_background-image" onerror="Imgnofind()"/>
				<p   class="base_content_font base_black_grey padding_left_right5">
				无锡我羡慕羡慕羡慕
				</p>
				</div>-->
			</div>
			<div class="divstyle bgcolor">
				<img src="./image/icon_plan_blue.png"  class="img_width"/><samp class="base_dark_grey base_content_font padding_left5">蓝血计划</samp>
			</div>
			<ul class="mui-table-view" id="div_paln" ></ul>
			<div class="divstyle bgcolor">
				<img src="./image/icon_measurement.png"  class="img_width"/><samp class="base_dark_grey base_content_font padding_left5">我的测评</samp>
			</div>
			<ul class="mui-table-view" id="div_news" ></ul>
		</div>
		<div class="noSign"   id="noData"  hidden="hidden">
			<img src="./image/icon_nodata.png" width="60%">
			<p class="font16 top_15 base_dark_grey" >
				暂无数据
			</p>
		</div>
		<div class="loadFailure" hidden="hidden" id="noNet">
			<img src="./image/icon_nonet.png" width="60%">
			<p class="" >
				数据加载失败
			</p>
			<p>
				请检查您的网络
			</p>
			<button type="button" class="mui-btn mui-btn-outlined" onclick="loaddata()">
				重新加载
			</button>
		</div>
	</body>
	<script type="text/javascript" src="./script/api.js"></script>
	<script type="text/javascript" src="./script/common.js"></script>
	<script type="text/javascript" src="./script/MD5.js"></script>
	<script type="text/javascript" src="./script/jquery.min.js"></script>
	<script type="text/javascript" src="./script/mui.min.js"></script>
	<script type="text/javascript" src="./script/requestTool.js"></script>
    <script type="text/javascript" src="./script/ui.js"></script>
	<script type="text/javascript">
		var rotationArr = new Array();
		var type = '';
		var courses_data = [];
		//慕课数组
		var plan_data = [];
		//蓝血数组
		//1:老师，0学生,2师傅，3企业HR
		//轮播图数据
		apiready = function() {
			type = api.pageParam.type;
			initHeaderUI();
			loaddata();
			onclickwin();
			addListener();
			if (type == 1) {
				$("#Tec_div").show();
				$("#stu_div").hide();
				$("#Master_div").hide();
					$("#HR_div").hide();
				sendBuriedNotifi('0', '老师端实习首页', '158');
				
			} else if (type == 0) {
				$("#Tec_div").hide();
				$("#stu_div").show();
				$("#Master_div").hide();
				$("#HR_div").hide();
				sendBuriedNotifi('0', '学生实习首页', '157');
				
			} else if (type == 2) {
				$("#Tec_div").hide();
				$("#Stu_div").hide();
				$("#Master_div").show();
				$("#HR_div").hide();
				sendBuriedNotifi('0', '师傅端实习首页', '247');
			} else if (type == 3) {
				$("#Tec_div").hide();
				$("#Stu_div").hide();
				$("#Master_div").hide();
			
				$("#HR_div").show();
				sendBuriedNotifi('0', 'HR实习首页', '253');
			}
		};
		function backClick() {
			api.closeWin({
			});
		}

		function addListener() {
			api.addEventListener({
				name : 'RefreshPracticeNotifi'
			}, function(ret, err) {
				loaddata();
			});
		}

		//加载数据
		function loaddata() {
			showProgress();
			var params = {
				uid : $api.getStorage('cfnetppuid'),
				jid : $api.getStorage('cfnetppjid'),
				usertype : type
			};
//						   alert("教师端轮播"+JSON.stringify(params));
			cfnetppPOST(url_trainIndex, params, true, function(data, status) {
				api.hideProgress();
//					   alert("教师端轮播"+url_trainIndex)
				if (status == 'success') {
					if (data.code == 200) {
						$('#main').show();
						var list = data.data;
						rotationArr = list.shouye;
						setupRotationData();
						news(list.zixun, list.zixun.length);
						courses_data = list.course;
						//慕课数组
						plan_data = list.plan;
						//蓝血数组
						courses(list.course, list.course.length)
						plans(list.plan, list.plan.length);
					} else {
						$('#main').hide();
						$('#noData').show();
						$('#noNet').hide();
					}
				} else {
					$('#main').hide();
					$('#noData').show();
					$('#noNet').hide();
				}
			})
		}

		//设置轮播图数据
		function setupRotationData() {
			if (rotationArr.length == 1) {
				var rotationHtml = '';
				rotationHtml = noRotationHtmlString(0, rotationArr[0]);
				$('#noRotation').html(rotationHtml);
				$('#noRotation').show();
				$('#rotation').hide();
			} else if (rotationArr.length > 1) {
				var rotationHtml = '';
				//额外增加的一个节点(循环轮播：第一个节点是最后一张轮播)
				var lastIndex = rotationArr.length - 1;
				var rotationLastData = rotationArr[lastIndex];
				rotationHtml += firstLastImgHtml(lastIndex, rotationLastData);
				//遍历数组
				for (var i = 0; i < rotationArr.length; i++) {
					var rotationData = rotationArr[i];
					rotationHtml += rotationHtmlString(i, rotationData);
				}
				//额外增加的一个节点(循环轮播：最后一个节点是第一张轮播)
				var firstIndex = 0;
				var rotationFirstData = rotationArr[firstIndex];
				rotationHtml += firstLastImgHtml(firstIndex, rotationFirstData);
				//设置轮播图代码
				$('#rotation').html(rotationHtml);
				//设置page Control
				$('#pageControl').html(pageControlHtml(rotationArr.length));
				//设置自动轮播
				setupAutoRotation();
				$('#noRotation').hide();
				$('#rotation').show();
			} else {
				$('#rotation').html(NullImgHtmli())
				$('#noRotation').show();
				$('#rotation').hide();
			}
			//		//设置轮播图点击事件
			setupRotationCellClick();
		}

		function setupAutoRotation() {
			var slider = mui("#train_slider");
			slider.slider({
				interval : 3000
			});
		}

		//分页html
		function pageControlHtml(count) {
			var pageControl = '';
			pageControl += '<div class="mui-indicator mui-active"></div>';
			for (var i = 1; i < count; i++) {
				pageControl += '<div class="mui-indicator"></div>';
			}
			return pageControl;
		}

		//无轮播图数据的情况
		function NullImgHtmli() {
			return '<div  class="rotation-cell mui-slider-item mui-slider-item-duplicate">' + '<a href="#">' + '<img class="rotation-img" src="./image/firstNewsTitls1.png">' + '</a>' + '</div>';
		}

		//轮播图首尾
		function firstLastImgHtml(index, data) {
			return '<div index="' + index + '" class="rotation-cell mui-slider-item mui-slider-item-duplicate">' + '<a href="#">' + '<img class="rotation-img" src="' + data.image + '">' + '</a>' + '</div>';
		}

		//轮播图
		function rotationHtmlString(index, data) {
			return '<div index="' + index + '" class="rotation-cell mui-slider-item">' + '<a href="#">' + '<img class="rotation-img" src="' + data.image + '">' + '</a>' + '</div>';
		}

		//不轮播的cell
		function noRotationHtmlString(index, data) {
			return '<div index="' + index + '" class="rotation-cell">' + '<img class="rotation-img" src="' + data.image + '">' + '</div>';
		}

		function setupRotationCellClick() {
			$('.rotation-cell').unbind('click');
			$('.rotation-cell').click(function(event) {
				if (api.connectionType == "none") {
					api.toast({
						msg : '网络异常，请检查网络！'
					});
					return;
				}
				var index = $(this).attr('index');
				var rotationData = rotationArr[parseInt(index)];
				var url1 = rotationData.detail;
				if (url1 != '' && url1 != null && url1 != undefined) {
					if (url1.indexOf("http") == -1) {//包含
						return;
					}
					var pageParam = {
						url : isfreelogin(rotationData.islogin, url1),
						title : rotationData.cname,
						sourceurl : window.location.pathname,
						sourcetitle : document.title,
						shareurl : url1
					}
					api.openWin({useWKWebView:true,
						name : 'indexLunDetailsWindow',
						url : './html/HomePage/indexLunDetailsWindow.html',
						pageParam : pageParam
					});
				}
			});
		}

		function onclickwin() {
			var sourceurl = window.location.pathname;
			var sourcetitle = document.title;
			var DataParam = {
				sourceurl : sourceurl,
				sourcetitle : sourcetitle
			};
			//查看签到
			$('#qiandao').click(function() {
				api.openWin({useWKWebView:true,
					name : 'Teacher_checkSignWindow',
					url : 'html/Manage/Teacher_checkSignWindow.html',
					pageParam : DataParam
				});
				sendBuriedNotifi('1', '老师端实习首页', '158');
			
			});
			//查看报告
			$('#chakan_baogao').click(function() {
			    DataParam["index"]=0
				api.openWin({useWKWebView:true,
					name : 'Practice_TeacherReportWindow',
					url : 'html/Practice_Teacher/Practice_TeacherReportWindow.html',
					pageParam : DataParam
				});
				sendBuriedNotifi('1', '老师端实习首页', '158');
				
			});
		
			//提交巡视记录
			$('#xunfangjilu').click(function() {
				api.openWin({useWKWebView:true,
					name : 'teacherCheckRecord',
					url : 'html/Manage/teacherCheckRecord.html',
					pageParam : DataParam
				});
				sendBuriedNotifi('1', '老师端实习首页', '158');
			});
			//老师端管理
			$('#managementid').click(function() {
				api.openWin({useWKWebView:true,
					name : 'ManagementViewWind',
					url : 'html/Practice_Teacher/ManagementViewWind.html',
					pageParam : DataParam
				});
				sendBuriedNotifi('1', '老师端实习首页', '158');
			});
			//x学生签到
			$('#Stuqiandao').click(function() {
				api.openWin({useWKWebView:true,
					name : 'Student_dailyCheckWindow',
					url : 'html/TrainReport/Student_dailyCheckWindow.html',
					pageParam : DataParam
				});
			  sendBuriedNotifi('1', '学生实习首页', '157');
			});
			//学生提交报告
			$('#tijiaoBaogao').click(function() {
				api.openWin({useWKWebView:true,
					name : 'Practice_StudentReport_Win',
					url : 'html/Practice_Student/Practice_StudentReport_Win.html',
					pageParam : DataParam
				});
            sendBuriedNotifi('1', '学生实习首页', '157');
			});
			//学生学习
			$('#learnid').click(function() {
				DataParam['openType'] = 'train_stu';
				api.openWin({useWKWebView:true,
					name : 'Student_studyWindow',
					url : 'html/Study/Student_studyWindow.html',
					pageParam : {
					sourceurl : sourceurl,
					sourcetitle : sourcetitle,
					openType : 'train_stu'
		     	}
				});
				sendBuriedNotifi('1', '学生实习首页', '157');
			});
			//学生考试
			$('#testid').click(function() {
				api.openWin({useWKWebView:true,
					name : 'Practice_StudentExamWindow',
					url : 'html/Practice_Student/Practice_StudentExamWindow.html',
					pageParam : {
						sourceurl : sourceurl,
						sourcetitle : sourcetitle,
						openType : 'train_stu'
					}
				});
				  sendBuriedNotifi('1', '学生实习首页', '157');
			});
			//学生轨迹
			$('#guijiid').click(function() {
				api.openWin({useWKWebView:true,
					name : 'PositionDetailsViewWind',
					url : 'html/Practice_Student/PositionDetailsViewWind.html',
					pageParam : {
						sourceurl : sourceurl,
						sourcetitle : sourcetitle,
         				uid : $api.getStorage('cfnetppuid'),
//						uid : 144575
					}
				});
				  sendBuriedNotifi('1', '学生实习首页', '157');
			});
			//师傅端徒弟
			$('#discipleid').click(function() {
				api.openWin({useWKWebView:true,
					name : 'Practice_MasterApprenticeWindow',
					url : 'html/Practice_Master/Practice_MasterApprenticeWindow.html',
					pageParam : DataParam
				});
				 sendBuriedNotifi('1', '师傅端实习首页', '247');
			});
			//师傅端评分
			$('#pingfenid').click(function() {
				api.openWin({useWKWebView:true,
					name : 'Practice_MasterGradeWindow',
					url : 'html/Practice_Master/Practice_MasterGradeWindow.html',
					pageParam : DataParam
				});
				 sendBuriedNotifi('1', '师傅端实习首页', '247');
			});
			//师傅端报告
			$('#Masbaogao').click(function() {
			    DataParam["index"]=0;
				api.openWin({useWKWebView:true,
					name : 'PracticeMasterReportWindow',
					url : 'html/Practice_Master/PracticeMasterReportWindow.html',
					pageParam : DataParam
				});
				 sendBuriedNotifi('1', '师傅端实习首页', '247');
			});
			//查看签到
			$('#HRqiandao').click(function() {
				api.openWin({useWKWebView:true,
					name : 'HRcheckSignWindow',
					url : 'html/Practice_HR/HRcheckSignWindow.html',
					pageParam : DataParam
				});
				sendBuriedNotifi('1', 'HR实习首页', '253');
			
			});
			//查看报告
			$('#HRchakan_baogao').click(function() {
			    DataParam["index"]=0
				api.openWin({useWKWebView:true,
					name : 'PracticeHRReportWindow',
					url : 'html/Practice_HR/PracticeHRReportWindow.html',
					pageParam : DataParam
				});
				sendBuriedNotifi('1', 'HR实习首页', '253');
				
			});
		
			//HR分析
			$('#HRAnalysis').click(function() {
				api.openWin({useWKWebView:true,
					name : 'HRAnalysis',
					url : 'html/Practice_HR/HRAnalysis.html',
					pageParam : DataParam
				});
               sendBuriedNotifi('1', 'HR实习首页', '253');
			});
			//HR管理
			$('#HRmanagementid').click(function() {
				api.openWin({useWKWebView:true,
					name : 'HRManagementViewWind',
					url : 'html/Practice_HR/HRManagementViewWind.html',
					pageParam : DataParam
				});
             sendBuriedNotifi('1', 'HR实习首页', '253');
			});
		}

		//课程
		function courses(datas, len) {
			var moocs = '';
			for (var i = 0; i < len; i++) {
				var data = datas[i];
				var div = '';
				if (i == 0 || i == 2) {
					div = '<div  class= "div_img_left clearfix right10" onclick="CheckCourseClick(' + i + ')">';
				} else {
					div = '<div  class= "div_img_left left10" onclick="CheckCourseClick(' + i + ')">';
				}
				var mooc = div + '<img  src="' + data.image + '" class="td_left img_background-image" onerror="Imgnofind()"/>' + '<p   class="base_content_font base_black_grey padding_left_right5">' + data.cname + '</p>' + '</div>';
				moocs = moocs + mooc;
			}
			$('#div_course').html(moocs);
		}

		/**蓝血计划*/
		function plans(datas, len) {
			var news = '';
			for (var i = 0; i < len; i++) {
				var data = datas[i];
				var imgPath = data.image;
				var newhtml = '<li class="mui-table-view-cell train-cell" style="padding-right: 10px;padding-left: 10px" onclick="CheckPlanClick(' + i + ')">' + '<img class="hot-train-image" src="' + imgPath + '">' + '<div class="hot-train-title-div">' + '<p class="base_black_grey base_content_font train-title">' + data.cname + '</p>' + '<p class="base_grey base_tag_font hot-train-time">' + data.desc + '</p>' + '</div>' + '</li>';
				news = news + newhtml;
			}
			$("#div_paln").html(news);
		}
		var zixunArr = new Array();
		/**测评*/
		function news(datas, len) {
			var news = '';
			zixunArr = datas;
			for (var i = 0; i < len; i++) {
				var data = datas[i];
				var imgPath = data.img;
				var url = data.url;

				if (url == undefined || url == null) {
					url = '';
				}
				var newhtml = '<li n_url="'+url+'" class="mui-table-view-cell train-cell" onclick="CheckClicks(' + i + ')"  >' + '<img class="hot-train-image" src="' + imgPath + '">' + '<div class="hot-train-title-div">' + '<p class="base_black_grey base_content_font train-title">' + escape2Html(data.title).replace(/&/g, '') + '</p>' + '<p class="base_grey base_tag_font hot-train-time train-title">' + data.desc + '</p>' + '</div>' + '</li>';
				news = news + newhtml;
			}
			$("#div_news").html(news);
		}

		//测评
		function CheckClicks(index) {
			var data = zixunArr[parseInt(index)];
			var istype = data.istype;
			var type = data.type;
			var url = data.url;
			var winName = "";
			var winUrl = "";
			var params = null;
			if (istype == 0) {//没考
				if (type == 4) {
					winName = "Practice_Holland_EvaluationAnalysis"
					winUrl = "html/TrainReport/Practice_Holland_EvaluationAnalysis.html"
				} else {
					winName = "Practice_EvaluationAnalysis"
					winUrl = "html/TrainReport/Practice_EvaluationAnalysis.html"
				}
			} else {
				if (type == 4) {
					winName = "HolandeAnalysis_window"
					winUrl = "html/Holander/HolandeAnalysis_window.html"
				} else {
					winName = "Practice_EvaluationAnalysisScore"
					winUrl = "html/TrainReport/Practice_EvaluationAnalysisScore.html"
				}
			}
			params = {
				type : type,
				istype : istype, //0:未参加 1:参加
				sourceurl : window.location.pathname,
				sourcetitle : document.title
			};
			if (type == 5) {
				winName = 'QRCode_Win';
				winUrl = 'html/HomePage/QRCode_Win.html'
				params['url'] = url;
			}
			api.openWin({useWKWebView:true,
				name : winName,
				url : winUrl,
				pageParam : params
			});
			sendBuriedNotificlose();
		}

		//蓝血计划
		function CheckPlanClick(i) {
			var connectionType = api.connectionType;
			if (connectionType == 'none') {
				ShowToast("暂无网络，请检查网络");
				return;
			}
			var data = plan_data[i];
			api.openWin({useWKWebView:true,
				name : 'indexLunDetailsWindow',
				url : 'html/HomePage/indexLunDetailsWindow.html',
				pageParam : {
					url : data.detail,
					title : data.cname,
					sourceurl : window.location.pathname,
					sourcetitle : document.title,
					ctitle : '热门资讯详情页',
					Newstype : 'HotNews',
					shareurl : data.detail
				}
			});
			sendBuriedNotificlose();
		}

		//公开课
		function CheckCourseClick(i) {
			var data = courses_data[i];
			var param = {
				imgurl : data.image,
				title : data.cname,
				courseType : '2109',
				planid : '',
				courseid : data.cid,
				cstatus : '',
				selected : '1',
				part : '',
				crid : '',
				userType : 'student',
				coursename : data.cname,
				coverimages : data.image,
				isCompetitiveProducts : 1,
				opentype:'courseCenter',
				sourceurl : window.location.pathname,
				sourcetitle : document.title,
				openType : 'train_stu'
			};
			api.openWin({useWKWebView:true,
				name : 'Student_trainCourseMoocTab',
				url : 'html/Study/Student_trainCourseMoocTab.html',
				bgColor : '#fff',
				vScrollBarEnabled : false,
				hScrollBarEnabled : false,
				pageParam : param
			});
			sendBuriedNotificlose();
		}
	function sendBuriedNotifi(busionessid, pagetype, pagetypeid) {
			var userinfo = {
				uid : $api.getStorage('cfnetppuid'),
				jid : $api.getStorage('cfnetppjid'),
				uname : $api.getStorage('cfnetppusername'),
			}
			var data = {
				busionessid : busionessid,
				pagetype : pagetype,
				pagetypeid : pagetypeid,
				sourceurl : api.pageParam.sourceurl,
				sourcetitle : api.pageParam.sourcetitle,
				accesspageurl : window.location.pathname,
				accesspagetitle : document.title,
				userinfo : userinfo
			}
			SendBehaviorTrajectoriesNotifi_Study(data);
		}
		function backClick() {
	   sendBuriedNotificlose();
			api.closeWin({
			});
		}
	function sendBuriedNotificlose(){
		if (type == 1) {
			      sendBuriedNotifi('1', '老师端实习首页', '158');
			} else if (type == 0) {
			     sendBuriedNotifi('1', '老师端实习首页', '157');
			} else if (type == 2){
			 sendBuriedNotifi('1', '师傅端实习首页', '247');
		
			}else if(type == 3){
			sendBuriedNotifi('1', 'HR实习首页', '253');
			}
			}
		

		function closewin() {
			api.addEventListener({
				name : 'keyback'
			}, function(ret, err) {
			   backClick();
			})
		}
	</script>
</html>